<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link rel="stylesheet" href="skin/base.css">
<link rel="stylesheet" href="skin/company.css">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/config.js"></script>
<script src="js/common.js"></script>

</head>
<body>
<div id="main" class="loading">
  <section id="content"></section>
</div>
</body>
<script>
	zy_init();
	function getMain(t){
		if(t==-1){
			$$('content').innerHTML = '';
			$$('main').className = 'loading';
		}
		var url = app_path+'index.php?m=iappYp&c=app&a=get_category&t=iappYp_company&catid='+l_catid_default['company'];
		uexXmlHttpMgr.open(t,'get',url,"8000");
		uexXmlHttpMgr.send(t);
	}
	
	window.uexOnload=function(type){
		if(!type){
			uexWindow.setBounce("1");
			uexWindow.setBounceParams("0",'{"imagePath":"res://loading.png","textColor":"#666","levelText":"","pullToReloadText":"拖动刷新","releaseToReloadText":"释放刷新","loadingText":"加载中，请稍等"}');
	　　　　	uexWindow.setBounceParams("1",'{"imagePath":"res://loading.png","textColor":"#666","levelText":"","pullToReloadText":"上拉加载更多","releaseToReloadText":"释放加载","loadingText":"加载中，请稍等"}');
            uexWindow.showBounceView("0","#f3f3f3","1");
            uexWindow.notifyBounceEvent("0","1");
			uexWindow.showBounceView("1","#f3f3f3","1");
　　　　		uexWindow.notifyBounceEvent("1","1");
			uexWindow.onBounceStateChange=function(t,s){
　　　　　　		if(t=="0"||t=="1"){
　　　　　　　　		if(s=="2"){
						getMain(t);
					}
				}
			}
	
			uexXmlHttpMgr.onData = function(opId, status, data){
				uexXmlHttpMgr.close(opId);
				uexWindow.resetBounceView(opId);
				if(status==1){
					$$('main').className='';
					if(opId<1){
						uexWindow.setBounceParams("0",'{"imagePath":"res://loading.png","textColor":"#666","levelText":"上次更新：'+Now()+'","pullToReloadText":"拖动刷新","releaseToReloadText":"释放刷新","loadingText":"加载中，请稍等"}');
					}
					
					data=JSON.parse(data);
					var List=data['list'];
					var contentHtml='';
					var Node;
					for(i=0;i<List.length;i++){
						contentHtml+='<menu ontouchstart="zy_touch(\'down\')" onclick="jump('+List[i]['id']+',\''+List[i]['title']+'\')"><strong>'+List[i]['title']+'</strong><div>';
						Node=List[i]['node'];
						for (n = 0; n < Node.length; n++) {
							if(n>0){
								contentHtml+=' ';
							}
							contentHtml+=Node[n]['title'];
						}
						contentHtml+='</div></menu>';
					}
					contentHtml+='</section>';
					$$("content").innerHTML=contentHtml;
					
				}else if(status==-1){
					$$('main').className='errer';
				}
			}
			
			getMain(-1);
		}
	}
	
	function jump(id,title){
		localStorage['company_catid']=id;
		localStorage['company_catname']=title;
		uexWindow.open('company_list','0','company_list.html','2','', '',4);
	}
	</script>
</html>